home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
176-200
/
scopedisk180
/
arexxtutorial
/
usn
/
jeremy.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-19
|
967b
|
51 lines
/* ARexx program - make sure the support library is open */
options results
if exists('RAM:IN.TXT') then call delete('RAM:IN.TXT')
if ~showlist('P','BAUD') then do
address command
'run BB:BaudBandit'
'waitforport BAUD'
address
kill = 1
end
address 'BAUD'
BAUD 1200
SEND 'ATDT12026530351\r'
CAPT 'RAM:IN.TXT'
WAIT UTC
WAIT UTC
call time('R')
CAPT OFF
SEND '\Ah'
address
if ~open('fh','RAM:IN.TXT') then do
say 'GetTime failed - ERROR 1'
exit 20
end
do until eof('fh')
parse value readln('fh') with a1 a2 a3 a4 .
if a4 = 'UTC' then do
parse var a3 1 hours 3 mins 5 secs +2
hours = hours + 19
if hours > 23 then do
hours = hours - 24
end
secs = secs + time('E') % 1 + 1
address command ''date hours':'mins':'secs
address command ''setclock 'save'
ok = 1
leave
end
end
if ok ~= 1 then say 'Mission failed!'
if kill == 1 then address BAUD 'SEND \Aq'
/* end of program */